#!usr/bin/env python
# -*- coding:utf-8 _*-
"""
@author:chengyanan
@file: register_page.py
@time: 2019/12/21  3:59 下午
"""
from base.find_element import FindElement


class RegisterPage:
    def __init__(self, driver):
        self.fd = FindElement(driver)
    #获取首页登录页面按钮
    def click_loginbtn_element(self):
        return self.fd.get_element("index_login_btn")

    #获取账户登录按钮
    def click_account_login_element(self):
        return self.fd.get_element("account_login")

    # 获取用户名
    def get_name_element(self):
        return self.fd.get_element("user_name")

    #获取密码
    def get_password_element(self):
        return self.fd.get_element("user_pwd")

    #获取登录按钮
    def get_login_btn(self):
        return self.fd.get_element("reg_btn")
    #获取输入账户为空的文案
    def get_name_error_element(self):
        return self.fd.get_element("name_null_error")

    #获取为空的密码提示
    def get_password_error_element(self):
        return self.fd.get_element("password_null_error")

    #获取用户名和密码都为空都提示
    def get_name_password_null_element(self):
        return self.fd.get_element("name_and_password_null")